{__NOLAYOUT__}
<include file="Index:header" />
<script type="text/javascript">

    /**
     * 全选checkbox,注意：标识checkbox id固定为为check_box
     * @param string name 列表check名称,如 uid[]
     */
    function selectall(name) {
        //alert(name);
        if ($("#check_box").attr("checked")=='checked') {
            $("input[name='"+name+"']").each(function() {
                $(this).attr("checked","checked");


            });
        } else {
            $("input[name='"+name+"']").each(function() {
                $(this).removeAttr("checked");
            });
        }
    }
    function confirm_delete(){
        if(confirm('确认删除吗？')) $('#myform').submit();
    }
</script>

<script type="text/javascript" src="/public/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="/public/fancybox/source/jquery.fancybox.js"></script>

<link rel="stylesheet" type="text/css" href="/public/fancybox/source/jquery.fancybox.css" media="screen" />
 

<script type="text/javascript">
    $(document).ready(function() {
        /*
         *  Simple image gallery. Uses default settings
         */

        $('.fancybox').fancybox();

        $("#fancybox-manual-b").click(function() {
            $.fancybox.open({

                type : 'iframe',
                padding : 5
            });
        });



    });
</script>
<style type="text/css">
    .fancybox-custom .fancybox-skin {
        box-shadow: 0 0 50px #222;
    }
</style>
<div class="pad-10">
<div class="content-menu ib-a blue line-x">
    {$nav_submenu}
</div>
		<form name="myform" id="myform" action="" method="post" >
        <div class="table-list">
		<table  width="68%"><!-- Table -->	
			<thead>
						<tr>
							<th><input type="checkbox" class="checkall" /></th>
							<th>角色名称</th>
							<th>角色描述</th>
							<th>状态</th>
							<!--  <th>每日消耗</th>-->
							<!--  <th>添加时间</th>-->
							<th>管理操作</th>
						</tr>
					</thead>
					<script type="text/javascript" >
							$(function(){
							$('.confirm_del').click(function(){
								return confirm('确认要删除？');
            
							 })
        
						})
					</script>
					<tbody>
						<volist name="rolelist" id="rolelist">
						
                        <td align="center"><input type="checkbox"  class="inputcheckbox "  name="ids[]" value="{$rolelist.id}" /></td>
							<td align="center">{$rolelist.name}</td>
							<td align="center">{$rolelist.remark}</td>
							<?php if($rolelist['status'])
							    {
							        $tempstatus = '启用';
							    }
							    else
							    {
							        $tempstatus = '注销';
							    }
							?>
							
							<td align="center">{$tempstatus}</td>
							
							<!--  <td>{$rolelist['roleaddtime']|date="Y-m-d H:i:s",###}</td>-->
							<td align="center">
                            <?php
                            $is_list=0;
                            if(session('roleid')> $rolelist['id'] || session('roleid')==1)
                                {
                                    $is_list=1;
                                }
                                else
                                {
                                    $is_list=0;
                                }

                            ?>
                             <?php
                             if( $is_list==1)
                             {
                             ?>
							<?php if(!empty($egarr['35'])){ ?>
							<a href="__APP_PATH__index.php?g=Admin&m=Role&a=setting_priv&roleId={$rolelist['id']}"  class="fancybox fancybox.iframe">权限设置</a>|
							<?php 
							} 
							if(!empty($egarr['33'])){
							?>
							<a href="__APP_PATH__index.php?g=Admin&m=Role&a=edit&id={$rolelist['id']}" class="fancybox fancybox.iframe">修改</a>|
							<?php 
							} 
							if(!empty($egarr['34'])){
							?>
							<a href="__APP_PATH__index.php?g=Admin&m=Role&a=delete&id={$rolelist['id']}" class="confirm_del" >删除</a>
							<?php } ?>

                                <?php
                                }
                                ?>

							</td>
						</tr>
						</volist>
					</tbody>
				</table> <!-- END Table -->
        </form>
    <div id="pages" class="text-c">
				{$rolepage}
     </div>
	
			

			
		</div> <!-- END Content -->
	</div>
<include file="Public:content_footer" />